package com.systop.party08.adapter;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.systop.party08.entity.TabVpEntity;

import java.util.ArrayList;


/**
 * @创建者 gqf
 * @创建时间 2019/5/8
 * @描述 ${}
 */
public class FragPagerAdapter extends FragmentPagerAdapter {

    private ArrayList<TabVpEntity> mTabVps;

    public FragPagerAdapter(FragmentManager fm, ArrayList<TabVpEntity> mData) {
        super(fm);
        this.mTabVps = mData;
    }

    @Override
    public Fragment getItem(int position) {
        return mTabVps.get(position).getFragment();
    }

    @Override
    public int getCount() {
        return mTabVps.size();
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTabVps.get(position).getStr();
    }

}
